package cn.com.tupperware.entity;

import java.util.ArrayList;
import java.util.List;

public class V_Products_by_categoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public V_Products_by_categoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCategorynameIsNull() {
            addCriterion("CategoryName is null");
            return (Criteria) this;
        }

        public Criteria andCategorynameIsNotNull() {
            addCriterion("CategoryName is not null");
            return (Criteria) this;
        }

        public Criteria andCategorynameEqualTo(String value) {
            addCriterion("CategoryName =", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameNotEqualTo(String value) {
            addCriterion("CategoryName <>", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameGreaterThan(String value) {
            addCriterion("CategoryName >", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameGreaterThanOrEqualTo(String value) {
            addCriterion("CategoryName >=", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameLessThan(String value) {
            addCriterion("CategoryName <", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameLessThanOrEqualTo(String value) {
            addCriterion("CategoryName <=", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameLike(String value) {
            addCriterion("CategoryName like", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameNotLike(String value) {
            addCriterion("CategoryName not like", value, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameIn(List<String> values) {
            addCriterion("CategoryName in", values, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameNotIn(List<String> values) {
            addCriterion("CategoryName not in", values, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameBetween(String value1, String value2) {
            addCriterion("CategoryName between", value1, value2, "categoryname");
            return (Criteria) this;
        }

        public Criteria andCategorynameNotBetween(String value1, String value2) {
            addCriterion("CategoryName not between", value1, value2, "categoryname");
            return (Criteria) this;
        }

        public Criteria andProductnameIsNull() {
            addCriterion("ProductName is null");
            return (Criteria) this;
        }

        public Criteria andProductnameIsNotNull() {
            addCriterion("ProductName is not null");
            return (Criteria) this;
        }

        public Criteria andProductnameEqualTo(String value) {
            addCriterion("ProductName =", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameNotEqualTo(String value) {
            addCriterion("ProductName <>", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameGreaterThan(String value) {
            addCriterion("ProductName >", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameGreaterThanOrEqualTo(String value) {
            addCriterion("ProductName >=", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameLessThan(String value) {
            addCriterion("ProductName <", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameLessThanOrEqualTo(String value) {
            addCriterion("ProductName <=", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameLike(String value) {
            addCriterion("ProductName like", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameNotLike(String value) {
            addCriterion("ProductName not like", value, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameIn(List<String> values) {
            addCriterion("ProductName in", values, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameNotIn(List<String> values) {
            addCriterion("ProductName not in", values, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameBetween(String value1, String value2) {
            addCriterion("ProductName between", value1, value2, "productname");
            return (Criteria) this;
        }

        public Criteria andProductnameNotBetween(String value1, String value2) {
            addCriterion("ProductName not between", value1, value2, "productname");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitIsNull() {
            addCriterion("QuantityPerUnit is null");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitIsNotNull() {
            addCriterion("QuantityPerUnit is not null");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitEqualTo(String value) {
            addCriterion("QuantityPerUnit =", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitNotEqualTo(String value) {
            addCriterion("QuantityPerUnit <>", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitGreaterThan(String value) {
            addCriterion("QuantityPerUnit >", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitGreaterThanOrEqualTo(String value) {
            addCriterion("QuantityPerUnit >=", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitLessThan(String value) {
            addCriterion("QuantityPerUnit <", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitLessThanOrEqualTo(String value) {
            addCriterion("QuantityPerUnit <=", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitLike(String value) {
            addCriterion("QuantityPerUnit like", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitNotLike(String value) {
            addCriterion("QuantityPerUnit not like", value, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitIn(List<String> values) {
            addCriterion("QuantityPerUnit in", values, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitNotIn(List<String> values) {
            addCriterion("QuantityPerUnit not in", values, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitBetween(String value1, String value2) {
            addCriterion("QuantityPerUnit between", value1, value2, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andQuantityperunitNotBetween(String value1, String value2) {
            addCriterion("QuantityPerUnit not between", value1, value2, "quantityperunit");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockIsNull() {
            addCriterion("UnitsInStock is null");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockIsNotNull() {
            addCriterion("UnitsInStock is not null");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockEqualTo(Short value) {
            addCriterion("UnitsInStock =", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockNotEqualTo(Short value) {
            addCriterion("UnitsInStock <>", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockGreaterThan(Short value) {
            addCriterion("UnitsInStock >", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockGreaterThanOrEqualTo(Short value) {
            addCriterion("UnitsInStock >=", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockLessThan(Short value) {
            addCriterion("UnitsInStock <", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockLessThanOrEqualTo(Short value) {
            addCriterion("UnitsInStock <=", value, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockIn(List<Short> values) {
            addCriterion("UnitsInStock in", values, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockNotIn(List<Short> values) {
            addCriterion("UnitsInStock not in", values, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockBetween(Short value1, Short value2) {
            addCriterion("UnitsInStock between", value1, value2, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andUnitsinstockNotBetween(Short value1, Short value2) {
            addCriterion("UnitsInStock not between", value1, value2, "unitsinstock");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedIsNull() {
            addCriterion("Discontinued is null");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedIsNotNull() {
            addCriterion("Discontinued is not null");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedEqualTo(Boolean value) {
            addCriterion("Discontinued =", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedNotEqualTo(Boolean value) {
            addCriterion("Discontinued <>", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedGreaterThan(Boolean value) {
            addCriterion("Discontinued >", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedGreaterThanOrEqualTo(Boolean value) {
            addCriterion("Discontinued >=", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedLessThan(Boolean value) {
            addCriterion("Discontinued <", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedLessThanOrEqualTo(Boolean value) {
            addCriterion("Discontinued <=", value, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedIn(List<Boolean> values) {
            addCriterion("Discontinued in", values, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedNotIn(List<Boolean> values) {
            addCriterion("Discontinued not in", values, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedBetween(Boolean value1, Boolean value2) {
            addCriterion("Discontinued between", value1, value2, "discontinued");
            return (Criteria) this;
        }

        public Criteria andDiscontinuedNotBetween(Boolean value1, Boolean value2) {
            addCriterion("Discontinued not between", value1, value2, "discontinued");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}